import request from '@/utils/request'

const invitationShared = {
  state: {
    sharedMethods: {}
  },
  mutations: {
    registerInvitationMethod(state, { key, method }) {
      state.sharedMethods[key] = method
    }
  }
}
export default invitationShared

// 查询邀请供应商招投标列表
export function listInvitation(query) {
  return request({
    url: '/bidding/invitation/list',
    method: 'get',
    params: query
  })
}

// 查询邀请供应商招投标详细
export function getInvitation(id) {
  return request({
    url: '/bidding/invitation/' + id,
    method: 'get'
  })
}

// 查询邀请供应商招投标详细
export function getInvitationByUidSid(uid,sid) {
  return request({
    url: '/bidding/invitation/invitationByUidSid/' + uid + "/" + sid,
    method: 'get'
  })
}

// 新增邀请供应商招投标
export function addInvitation(data) {
  return request({
    url: '/bidding/invitation',
    method: 'post',
    data: data
  })
}

// 修改邀请供应商招投标
export function updateInvitation(data) {
  return request({
    url: '/bidding/invitation',
    method: 'put',
    data: data
  })
}

// 删除邀请供应商招投标
export function delInvitation(id) {
  return request({
    url: '/bidding/invitation/' + id,
    method: 'delete'
  })
}
